<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title><?php echo $web_title;?></title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport' />
        <!-- bootstrap 3.0.2 -->
        <!--<link href="<?php echo base_url()?>admin/css/bootstrap.min.css" rel="stylesheet" type="text/css" />-->
        <link href="<?php echo base_url()?>assets/extends/datetimepicker/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen" />
        <!-- font Awesome -->
        <link href="<?php echo base_url()?>admin/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="<?php echo base_url()?>admin/css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="<?php echo base_url()?>admin/css/AdminLTE.css" rel="stylesheet" type="text/css" />
        <!-- Bootstrap time Picker -->
        <link href="<?php echo base_url()?>assets/extends/datetimepicker/bootstrap-datetimepicker.css" rel="stylesheet" media="screen" />                 
        <!-- bootstrap wysihtml5 - text editor -->
        <link href="<?php echo base_url()?>admin/css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css" rel="stylesheet" type="text/css" />
        <!-- Admin JS -->    
        <link href="<?php echo base_url()?>admin/css/mimin.css" rel="stylesheet" type="text/css" />  
        
        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
        
        <!-- Set base href URL -->
        <base href="<?php echo base_url(); ?>" />
        <!-- blueimp Gallery styles -->
        <link rel="stylesheet" href="<?php echo base_url()?>assets/extends/fileupload/css/blueimp-gallery.min.css" />
        <!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
        <link rel="stylesheet" href="<?php echo base_url()?>assets/extends/fileupload/css/jquery.fileupload.css" />
        <link rel="stylesheet" href="<?php echo base_url()?>assets/extends/fileupload/css/jquery.fileupload-ui.css" />
        <!-- CSS adjustments for browsers with JavaScript disabled -->
        <noscript><link rel="stylesheet" href="<?php echo base_url()?>assets/extends/fileupload/css/jquery.fileupload-noscript.css" /></noscript>
        <noscript><link rel="stylesheet" href="<?php echo base_url()?>assets/extends/fileupload/css/jquery.fileupload-ui-noscript.css" /></noscript>
        <style>
            #map-canvas {
              height: 100%;
              margin: 0px;
              padding: 0px
            }
            .controls {
              margin-top: 16px;
              border: 1px solid transparent;
              border-radius: 2px 0 0 2px;
              box-sizing: border-box;
              -moz-box-sizing: border-box;
              height: 32px;
              outline: none;
              box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
            }

            #pac-input {
              background-color: #fff;
              padding: 0 11px 0 13px;
              width: 400px;
              font-family: Roboto;
              font-size: 15px;
              font-weight: 300;
              text-overflow: ellipsis;
            }

            #pac-input:focus {
              border-color: #4d90fe;
              margin-left: -1px;
              padding-left: 14px;  /* Regular padding-left + 1. */
              width: 401px;
            }

            .pac-container {
              font-family: Roboto;
            }

            #type-selector {
              color: #fff;
              background-color: #4d90fe;
              padding: 5px 11px 0px 11px;
            }

            #type-selector label {
              font-family: Roboto;
              font-size: 13px;
              font-weight: 300;
            }

          </style>
    </head>
    <body class="skin-blue">
        <!-- header logo: style can be found in header.less -->
        <header class="header">
            <?php $this->load->view("mimin/template/header");?>
        </header>
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">
                <!-- sidebar: style can be found in sidebar.less -->
                <!-- LEFT NAV MENU -->
                <section class="sidebar">
                    <?php $this->load->view("mimin/template/left_nav");?>
                </section>
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">
                <?php
                $this->load->view($main_view);
                ?>
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->
        
        <!-- jQuery 2.0.2 -->
        <!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>-->
        <script type="text/javascript" src="<?php echo base_url()?>assets/js/jquery.2.0.2.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>assets/js/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url()?>assets/js/jquery.form.min.js"></script>
        
        <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&sensor=false"></script>
        
        <!-- Bootstrap -->
        <script src="<?php echo base_url()?>admin/js/bootstrap.min.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>admin/js/bootstrap-dialog.min.js" type="text/javascript"></script>
        
        <!-- InputMask -->
        <script src="<?php echo base_url()?>admin/js/plugins/input-mask/jquery.inputmask.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>admin/js/plugins/input-mask/jquery.inputmask.date.extensions.js" type="text/javascript"></script>       
        <!-- CK Editor -->
        <script src="<?php echo base_url()?>admin/js/plugins/ckeditor/ckeditor.js" type="text/javascript"></script>
        <!-- Bootstrap Date Time Picker -->
        <script src="<?php echo base_url()?>assets/extends/datetimepicker/bootstrap-datetimepicker.js" type="text/javascript" charset="UTF-8"></script>
        
        <!-- AdminLTE App -->
        <script src="<?php echo base_url()?>admin/js/AdminLTE/app.js" type="text/javascript"></script>
        <script src="<?php echo base_url()?>assets/js/mimin.js" type="text/javascript"></script>
        
        <!-- Userdefined -->
        <script type="text/javascript">
            $(function() {
                $('.form_datetime').each(function(){
                    $('.form_datetime').datetimepicker({
                        weekStart: 1,
                        todayBtn:  1,
                        autoclose: 1,
                        todayHighlight: 1,
                        startView: 2,
                        forceParse: 0,
                    });
                });
            
                // Replace the <textarea id="desc"> with a CKEditor
                // instance, using default configuration.
                CKEDITOR.replace('desc');      
            });
            
            /*
             * author Dinov
             * 20141017
             * show google maps in services form and get lat long after click the map
             */
            function initialize() {
                var lat_field       = $("input#lat");
                var long_field      = $("input#long");
                var markers         = [];
                var map             = new google.maps.Map(document.getElementById('map-canvas'), { zoom: 3});
        
                var defaultBounds   = new google.maps.LatLngBounds(
                    new google.maps.LatLng(5.89, 95.319),
                    new google.maps.LatLng(-1.33, 133.17));
                map.fitBounds(defaultBounds);
        
                // Create the search box and link it to the UI element.
                var input           = /** @type {HTMLInputElement} */(
                    document.getElementById('pac-input'));
                map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
        
                var searchBox       = new google.maps.places.SearchBox(/** @type {HTMLInputElement} */(input));
        
                // [START region_getplaces]
                // Listen for the event fired when the user selects an item from the
                // pick list. Retrieve the matching places for that item.
                google.maps.event.addListener(searchBox, 'places_changed', function() {
                    var places          = searchBox.getPlaces();
                    
                    if (places.length == 0) { return; }
            
                    for (var i = 0, marker; marker = markers[i]; i++) {
                        marker.setMap(null);
                    }
            
                    // For each place, get the icon, place name, and location.
                    markers = [];
                    var bounds = new google.maps.LatLngBounds();
                    for (var i = 0, place; place = places[i]; i++) {
                        var image = {
                            url: place.icon,
                            size: new google.maps.Size(71, 71),
                            origin: new google.maps.Point(0, 0),
                            anchor: new google.maps.Point(17, 34),
                            scaledSize: new google.maps.Size(25, 25)
                        };
            
                        // Create a marker for each place.
                        var marker = new google.maps.Marker({
                            map: map,
                            icon: image,
                            title: place.name,
                            position: place.geometry.location
                        });
                        google.maps.event.addListener(marker, 'click', function(event) {
                            lat_field.val(event.latLng.lat());
                            long_field.val(event.latLng.lng());
                        });
                        markers.push(marker);
            
                        bounds.extend(place.geometry.location);
                    }
            
                    map.fitBounds(bounds);
                });
                // [END region_getplaces]
        
                // Bias the SearchBox results towards places that are within the bounds of the
                // current map's viewport.
                google.maps.event.addListener(map, 'bounds_changed', function() {
                    var bounds = map.getBounds();
                    searchBox.setBounds(bounds);
                });
                google.maps.event.addListener(map, 'click', function(event) {
                    lat_field.val(event.latLng.lat());
                    long_field.val(event.latLng.lng());
                });
            }
        
            google.maps.event.addDomListener(window, 'load', initialize);
        </script>
        
        <!-- The jQuery UI widget factory, can be omitted if jQuery UI is already included -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/vendor/jquery.ui.widget.js"></script>
        <!-- The Templates plugin is included to render the upload/download listings -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/tmpl.min.js"></script>
        <!-- The Load Image plugin is included for the preview images and image resizing functionality -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/load-image.all.min.js"></script>
        <!-- The Canvas to Blob plugin is included for image resizing functionality -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/canvas-to-blob.min.js"></script>
        <!-- blueimp Gallery script -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.blueimp-gallery.min.js"></script>
        <!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.iframe-transport.js"></script>
        <!-- The basic File Upload plugin -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.fileupload.js"></script>
        <!-- The File Upload processing plugin -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.fileupload-process.js"></script>
        <!-- The File Upload image preview & resize plugin -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.fileupload-image.js"></script>
        <!-- The File Upload audio preview plugin -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.fileupload-audio.js"></script>
        <!-- The File Upload video preview plugin -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.fileupload-video.js"></script>
        <!-- The File Upload validation plugin -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.fileupload-validate.js"></script>
        <!-- The File Upload user interface plugin -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/jquery.fileupload-ui.js"></script>
        <!-- The main application script -->
        <script src="<?php echo base_url()?>assets/extends/fileupload/js/main.js"></script>
        <!-- The XDomainRequest Transport is included for cross-domain file deletion for IE 8 and IE 9 -->
        <!--[if (gte IE 8)&(lt IE 10)]><script src="assets/extends/fileupload/js/cors/jquery.xdr-transport.js"></script><![endif]-->
        <!--<script src="http://code.jquery.com/jquery-latest.min.js"></script>-->
    </body>
</html>